{% extends "bpm/bpmindex.html" %}

{% block detail %}

    <div class="col-lg-5">
        <div class="panel panel-success" style="box-shadow: #c6c6c6 0px 0px 5px 5px">
            <div class="panel-heading">山西公司总助及以上审批效率统计</div>
            <div class="panel-body" style="height: 625px;">

                <row class="data-table">
                    <table class="table table-bordered table-hover">
                        <tr>
                            <th class="info">姓名</th>
                            <th class="warning">平均审批时间</th>
                            <th class="success">审批单数</th>
                        </tr>

                        {% for item in leader_xb %}
                            <tr>
                                <th>{{ item.name }}</th>
                                <th>{{ item.timenum }}小时</th>
                                <th>{{ item.totalnum }}条</th>
                            </tr>
                        {% endfor %}

                    </table>
                </row>

            </div>
        </div>
    </div>

    <div class="col-lg-7">

        {#内容#}

        <div class="panel panel-success" style="box-shadow: #c6c6c6 0px 0px 5px 5px">
            <div class="panel-heading">山西公司总助及以上审批时长统计</div>
            <div class="panel-body" style="height: 280px;">

                <div id="bpm_leader_sx_time" style="width:100%; height:280px;">
                    <script>
                        $(function () {
                                var hoststr = window.location.host
                                var chart = echarts.init(document.getElementById('bpm_leader_sx_time'), 'white', {renderer: 'canvas'});
                                var url = "http://"+hoststr+"/bpm/api_bpm_leader_sx_time?date=" + "{{ datestr }}";
                                $.ajax({
                                    type: "GET",
                                    url: url,
                                    dataType: 'json',
                                    success: function (result) {
                                        chart.setOption(result);
                                    }
                                });
                            }
                        )
                    </script>
                </div>


            </div>
        </div>

    </div>

    <div class="col-lg-7">


        <div class="panel panel-success" style="box-shadow: #c6c6c6 0px 0px 5px 5px">
            <div class="panel-heading">山西公司总助及以上审批单数统计</div>
            <div class="panel-body" style="height: 280px;">

                <div id="bpm_leader_sx_total" style="width:100%; height:280px;">
                    <script>
                        $(function () {
                                var hoststr = window.location.host
                                var chart = echarts.init(document.getElementById('bpm_leader_sx_total'), 'white', {renderer: 'canvas'});
                                var url = "http://"+hoststr+"/bpm/api_bpm_leader_sx_total?date=" + "{{ datestr }}";

                                $.ajax({
                                    type: "GET",
                                    url: url,
                                    dataType: 'json',
                                    success: function (result) {
                                        chart.setOption(result);
                                    }
                                });
                            }
                        )
                    </script>
                </div>
            </div>
        </div>

    </div>



{% endblock %}